package com.example.springbootdemo.elasticsearch;


import lombok.Data;
import org.elasticsearch.common.geo.GeoPoint;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.GeoPointField;

import java.io.Serializable;

@Document(indexName = "store_demo")
@Data
public class StoreInfo implements Serializable {
    @Id
    @Field(type = FieldType.Text)
    private String store_code;
    @Field(type = FieldType.Text)
    private String store_name;
    @Field(type = FieldType.Text)
    private String address;
    @GeoPointField
    private GeoPoint location;
}
